import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/Login'
import Index from '@/views/Index'
import Customer from '@/views/Customer'
import Worker from '@/views/Worker.vue'
import History from '@/views/History'
import Salary from '@/views/Salary'
import WaterDetail from '@/views/WaterDetail'

Vue.use(VueRouter)

const routes = [{
	path: '/',
	name: 'Login',
	component: Login
}, {
	path: '/Index',
	name: 'Index',
	component: Index,
	children: [{
		path: '/cust/custList',
		name: 'Customer',
		component: Customer
	}, {
		path: '/worker/workerList',
		name: 'Worker',
		component: Worker
	}, {
		path: '/history/historyList',
		name: 'History',
		component: History
	}, {
		path: '/salary/salaryList',
		name: 'Salary',
		component: Salary
	}, {
		path: '/waterDetail/waterDetailList',
		name: 'WaterDetail',
		component: WaterDetail
	}]
}]

const router = new VueRouter({
	routes
})

export default router
